<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>知果汇</title>
    <link href="_CSS_/bootstrap.min.css" rel="stylesheet">
    <link href="_CSS_/simple-line-icons.css" rel="stylesheet">
    <link href="_CSS_/font-awesome.min.css" rel="stylesheet">
    <link href="_CSS_/jasny-bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="_CSS_/nanoscroller.css">
    <link href="_CSS_/style.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="_CSS_/jquery-ui.css">
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        body {
            background-color: #ffffff;
            min-width: 600px;
        }

        .row {
            margin-left: 0px;
            margin-right: 0px;
            min-width: 600px;
        }

        .form .row {
            margin-top: 5px;
        }

        p {
            margin: 0;
        }

        .form .row img {
            width: 128px;
            height: 128px;
            margin-bottom: 5px;
        }

        .formControls {
            padding-right: 10px;
        }

        .radio-box {
            display: inline-block;
            width: 64px;
        }

        .formControls {
            padding-right: 50px;
            position: relative;
        }

        .textarea {
            height: 100px;
            resize: none;
            font-size: 14px;
            padding: 4px;
        }

        .textarea-numberbar {
            position: absolute;
            right: 70px;
            bottom: 5px;
            z-index: 1;
            margin-bottom: 0;
        }
    </style>
</head>
<body>
<article class="page-container">
    <form class="form form-horizontal" id="form-admin-add">
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">商品名称：</label>
            <div class="formControls col-xs-10 col-sm-10">
                <p id="username"></p>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">店铺名：</label>
            <div class="formControls col-xs-10 col-sm-10">
                <p id="name"></p>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">类别：</label>
            <div class="formControls col-xs-10 col-sm-10">
                <p id="category_id"></p>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">交易方式：</label>
            <div class="formControls col-xs-10 col-sm-10 skin-minimal">
                <p id="c_id"></p>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">价格：</label>
            <div class="formControls col-xs-10 col-sm-10">
                <p>￥<span id="store"></span></p>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">商品描述：</label>
            <div class="formControls col-xs-10 col-sm-10">
                <p id="content"></p>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">商品图片：</label>
            <div class="formControls col-xs-10 col-sm-10"> <span class="select-box" id="image" style="width:150px;">

            </span>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">发布时间：</label>
            <div class="formControls col-xs-10 col-sm-10">
                <p id="time"></p>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">状态：</label>
            <div class="formControls col-xs-10 col-sm-10">
                <p id="static"></p>
            </div>
        </div>
    </form>
</article>

<script src="_JS_/jquery.min.js"></script>
<script src="_JS_/bootstrap.min.js"></script>
<script src="_JS_/jasny-bootstrap.min.js"></script>
<script src="_JS_/jquery.slimscroll.min.js"></script>
<script src="_JS_/jquery.nanoscroller.min.js"></script>
<script src="_JS_/metismenu.min.js"></script>
<script src="_JS_/float-custom.js"></script>
<script src="_JS_/getMyDate.js"></script>
<script type="text/javascript">
    $(function () {
        var url = window.location.href;
        id = url.split("#")[1];
        $.ajax({
            type: 'GET',
            url: "{:url('api/trading/trading_msg')}",
            dataType: 'jsonp',
            jsonp: 'callback',
            data: {id: id},
            success: function (msg) {
                if (msg.code == 200) {
                    var time = msg.data.time;
                    ltime = getMyDate(time * 1000);

                    $("#username").html(msg.data.username);
                    $("#name").html(msg.data.king);
                    $("#category_id").html(msg.data.market_name);
                    $("#c_id").html(msg.data.trading_name);
                    $("#store").html(msg.data.store);
                    $("#content").html(msg.data.content);
                    $("#time").html(ltime);
                    $("#image").html('<img src="/Images/tradingMarket/' + msg.data.image + '">')
                    if (msg.data.static == 1) {
                        $("#static").html('待审核');
                    } else if (msg.data.static == 2) {
                        $("#static").html('审核成功');
                    } else {
                        $("#static").html('审核失败');
                    }
                } else {
                    layer.msg('获取信息不成功!', {icon: 5, time: 2000});
                }
            }
        })
    })
</script>
</body>
</html>